package com.gaocf.example.controller;

import com.gaocf.example.converter.UserConverter;
import com.gaocf.example.dto.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Configuration
public class HomeController {

    @Value("${app}")
    private String app;

    @RequestMapping("/")
    public String index() {
        User user = new User();
        user.setUserName("gaocf");
        user.setId(1);
        user.setSex(11);

        //System.out.println(UserConverter.INFO.toUserInfo(user));

        return app;
    }
}
